package thread2;

public class Producer extends Thread {
    Container container;

    public Producer(Container container) {
        this.container = container;
    }

    public void run() {
        for (int i = 1; i < 100; i++) {
            container.push(new Chicken(i));
            System.out.println("生产了" + i);
        }
    }
}
